#include "stm32f1xx_hal.h"
#include "stm32f103xb.h"
#define KEY1 1
#define KEY2 2
#define KEY3 3
#define KEY4 4

#define KEYA 0xC0
#define KEYB 0x0C
#define KEYC 0x30
#define KEYD 0x03

typedef enum { 
	SEND_IDLE, 
    SEND_HIGH, 
    SEND_LOW, 
    SEND_COMPLETE 
} SendState;

uint8_t enqueue_send_data(uint8_t recv_data);
void send_state_machine(void);